﻿using System;
using System.Security.Principal;
using System.Collections;
using System.Text;
using System.Security.Cryptography;
using BarberShop.Data;
namespace BarberShop.Model
{
	/// <summary>
	/// UserInfo:实体类(属性说明自动提取数据库字段的描述信息)
	/// </summary>
	[Serializable]
    public partial class UserInfoModel
	{
		public UserInfoModel()
		{}
		#region Model
		private int _id;
		private string _loginname="";
		private string _password="";
		private DateTime? _createdate;


        // Fields
        protected IIdentity identity;
        protected ArrayList permissionList;
        protected ArrayList permissionListid;
        protected ArrayList roleList;

		/// <summary>
		/// 
		/// </summary>
		public int ID
		{
			set{ _id=value;}
			get{return _id;}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Loginname
		{
			set{ _loginname=value;}
			get{return _loginname;}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Password
		{
			set{ _password=value;}
			get{return _password;}
		}
		/// <summary>
		/// 
		/// </summary>
		public DateTime? CreateDate
		{
			set{ _createdate=value;}
			get{return _createdate;}
		}
		#endregion Model

        public static UserInfoModel ConvertDataModel(UserInfo info)
        {
            UserInfoModel r = new UserInfoModel();
            r.CreateDate = info.CreateDate;
            r.ID = info.ID;
            r.Loginname = info.Loginname;
            r.Password = info.Password;
            return r;
        }


	}
}

